<?php
    if(!isset($showitem) && isset($_GET['showitem']))
        $showitem = $_GET['showitem'];

    if($showitem == 'info') $topmenuiteminfoclass = 'selected';
    elseif($showitem == 'wedding') $topmenuitemweddingclass = 'selected';
    elseif($showitem == 'guestbook') $topmenuitemguestbookclass = 'selected';
    elseif($showitem == 'gifts') $topmenuitemgiftsclass = 'selected';
?>
<div class="topmenutable">
    <table cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td>
                <?php echo '<a class="'.$topmenuiteminfoclass.'" href="?showitem=info">'.$topmenuiteminfo.'</a>'; ?>
            </td>
            <td>
                <?php echo '<a class="'.$topmenuitemweddingclass.'" href="?showitem=wedding">'.$topmenuitemwedding.'</a>'; ?>
            </td>
            <td>
                <?php echo '<a class="'.$topmenuitemguestbookclass.'" href="?showitem=guestbook">'.$topmenuitemguestbook.'</a>'; ?>
            </td>
            <td>
                <?php echo '<a class="'.$topmenuitemgiftsclass.'" href="?showitem=gifts">'.$topmenuitemgifts.'</a>'; ?>
            </td>
        </tr>
    </table>
</div>
